home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / blckade.exe / BLKADE1.C < prev    next >
C/C++ Source or Header  |  1992-05-11  |  2KB  |  48 lines

  1.  
  2. /* ------------------------------------------------------------------- */
  3. /*              Copyright (C) 1990-91 Indusoft Corp.                   */
  4. /*                     All rights reserved                             */
  5. /*              PO Box  26747  Greenville, SC 29616                    */
  6. /*                                                                     */
  7. /* ------------------------------------------------------------------- */
  8. /*   Contains messages corresponding to the error codes returned       */
  9. /*   by blockade() & calc_crc_file().                                  */
  10. /*                                                                     */
  11. /*   Returns a read only pointer to the appropriate message.           */
  12. /*                                                                     */
  13. /*                                                                     */
  14. /* ------------------------------------------------------------------- */
  15.  
  16. char * get_blk_err_msg(int num)
  17. {
  18.   char *sp;
  19.   static char *blk_err_msgs[] = {
  20.     "No error",                          /*  0  */
  21.     "No memory for buffer",              /*  1  */
  22.     "Error opening file",                /*  2  */
  23.     "No memory for file buffering",      /*  3  */
  24.     "File buffering failure",            /*  4  */
  25.     "Fseek error",                       /*  5  */
  26.     "Error reading data block",          /*  6  */
  27.     "Invalid data block info",           /*  7  */
  28.     "Error reading file",                /*  8  */
  29.     "Error reading file",                /*  9  */
  30.     "Error reading file",                /* 10  */
  31.     "Check Value error",                 /* 11  */
  32.     "File size error",                   /* 12  */
  33.     "Invalid error number" };            /* 13  */
  34.  
  35.    if (num == -1) num = 11;
  36.    if (num == -2) num = 12;
  37.    if ((num < 0) || (num > 12))  num = 13;    /* out of range */
  38.    sp = blk_err_msgs[num];
  39.    return(sp);
  40.   }
  41.  
  42. /* ------------------------------------------------------------------- */
  43. /*              Copyright (C) 1990-91 Indusoft Corp.                   */
  44. /*                     All rights reserved                             */
  45. /*              PO Box  26747  Greenville, SC 29616                    */
  46. /*                                                                     */
  47. /*---------------------------------------------------------------------*/
  48.